<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include::header('安全奖励设定')"/>
</head>
<style>
    #febs-incentiveRewardConfig .myLabel {
        display: inline;
        fontsize: 16px;
    }
    #febs-incentiveRewardConfig .rewardConfig-body {
        margin-top: 10px;
        height: calc(100% - 80px);
    }
    #febs-incentiveRewardConfig  #rewardAmountTax, #scoreAmountRatio {
        width: 20%;
        display: inline;
    }

</style>
<body class="febs-container" id="febs-incentiveRewardConfig">
<div class="febs-body layui-fluid" lay-title="安全奖励设定">
    <div class="febs-body-search" th:if="${hasHeadCompanyRole}">
        <form class="layui-form layui-table-form" lay-filter="incentiveRewardConfig-table-form"
              id="incentiveRewardConfig-table-form">
            <div class="layui-card">
                <div class="layui-card-body">
                    <div class="layui-form-item">
                        <div class="layui-inline" >
                            <label class="layui-form-label layui-form-label-sm">公司名称</label>
                            <div class="layui-input-inline" style="width: 280px;">
                                <select name="tenantSelect" id="tenantSelect" lay-search="">
                                    <option th:each="item:${tenantList }"
                                            th:value="${item.tenantId}" th:text="${item.tenantName}"
                                            th:selected="${currentTenantId ==item.tenantId}">
                                </select>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <div id="query" class="layui-btn">
                                <em class="layui-icon">&#xe615;</em> 查询
                            </div>
                        </div>

                    </div>
                </div>
            </div>
        </form>
    </div>
    <form class="layui-form layui-table-form rewardConfig-body" action="" lay-filter="config-form" th:style="'margin-top:'+(${hasHeadCompanyRole} ? '10px;':'0px;')+'height:'+(${hasHeadCompanyRole} ? 'calc(100% - 80px);':'calc(100% - 0px);')">
        <div class="layui-card febs-full">
            <div class="layui-card-body" style="height: calc(100% - 80px);">
                <div class="layui-row">
                    <div class="layui-col-md12">
                        <div class="layui-form-item febs-hide">
                            <label class="layui-form-label febs-form-item-require">ID：</label>
                            <div class="layui-input-block">
                                <input type="text" name="rewardConfigId" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="myLabel febs-form-item-require">1.税率和实际扣除额度的比例：奖励人民币1元，实际支付</label>
                            <input type="text" id="rewardAmountTax" name="rewardAmountTax" autocomplete="off"
                                   class="layui-input" minlength="1" placeholder="请输入实际支付金额"
                                   maxlength="20" lay-verify="required"
                                   onkeyup="value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.').replace(/\.{2,}/g,'.').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
                            >
                            <label class="myLabel">元</label>
                        </div>

                        <div class="layui-form-item">
                            <label class="myLabel febs-form-item-require">2.积分与金额的比例:奖励1积分,实际换算成金额为</label>
                            <input type="text" id="scoreAmountRatio" name="scoreAmountRatio" autocomplete="off"
                                   class="layui-input" placeholder="请输入实际换算金额"
                                   minlength="1" maxlength="20" lay-verify="required"
                                   onkeyup="value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.').replace(/\.{2,}/g,'.').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
                            >
                            <label class="myLabel">元</label>
                        </div>

                    </div>
                </div>
            </div>
            <div class="layui-card-footer" style="background: #f9f9f9;text-align: center;">
                <button type="reset" class="layui-btn febs-hide" id="reset-form"></button>
                <button class="layui-btn" lay-submit="" lay-filter="config-form-submit"
                        id="submit-form">保存
                </button>
            </div>
        </div>
    </form>
</div>
<th:block th:include="include::foot"/>
<script data-th-inline="javascript">
    var incentiveRewardConfig = [[${incentiveRewardConfig}]];
</script>
<script th:src="@{/febs/js/incentive/incentiveRewardConfig/incentiveRewardConfigList.js(v=1)}"></script>
</body>
</html>